<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common.jsp" %>
<!-- 分页表单：搜索表单必须添加属性： rel="pagerForm"  -->
<%@include file="/pageParameter.jsp" %>
<form id="searchForm" rel="pagerForm" onsubmit="return navTabSearch(this);"  
	action="${ctxPath }/sys/sysResource/listBymodule" method="post">
	
	<h2 class="contentTitle">设计【${module.name }】模块功能，您还可以更换模块：
		<select name="pid" onchange="submitForm()">
			<c:forEach var="item" items="${moduleList}" varStatus="s">
				<option value="${item.id }" <c:if test="${item.id eq module.id }">selected='selected'</c:if>>${item.name }</option>
			</c:forEach>
		</select>
	</h2>
	
</form>
<div class="pageContent" style="border-left:1px #B8D0D6 solid;border-right:1px #B8D0D6 solid">
	<!-- 工具栏 -->
	<div class="panelBar">
		<ul class="toolBar">
			<shiro:hasPermission name="sys/sysResource/add">
				<li>
					<a id="addMenu" class="add" title="添加菜单"
						href="${pageContext.request.contextPath}/sys/sysResource/addUI?pid=${module.id}&flag=moduleId" 
						target="dialog" mask="true"  width="600" height="400" >
						<span>添加</span>
					</a>
				</li>
			</shiro:hasPermission>
			<shiro:hasPermission name="sys/sysResource/delete">
				<li>
					<a id="delMenu" class="delete" title="确定要删除该记录吗？" target="ajaxTodo" 
						href="${pageContext.request.contextPath}/sys/sysResource/delete" >
						<span>删除</span>
					</a>
				</li>
			</shiro:hasPermission>
		</ul>
	</div>
	<!-- 内容区 -->
	<!-- 菜单树 -->
	<div layoutH="78" style="float: left; display: block; overflow: auto; width: 260px; border: solid 1px #CCC; line-height: 21px; background: #fff">
		${tree}
	</div>
	<div layoutH="78" id="jbsxBox" class="unitBox" style="margin-left: 266px;"></div>
</div>
<script type="text/javascript">
function onClickMenuNode(id) {
	$("#"+id).attr("href","${pageContext.request.contextPath}/sys/sysResource/editUI?id=" + id);
	$("#addMenu").attr("href", "${pageContext.request.contextPath}/sys/sysResource/addUI?pid=" + id);
	$("#delMenu").attr("href", "${pageContext.request.contextPath}/sys/sysResource/delete?id=" + id);
}
function submitForm(){
	$("#searchForm").submit();
}
</script>